#!/usr/bin/env python
# -*- coding: utf-8 -*-

from potherb.help import heappush, heappop

#######################################################################

if __name__ == "__main__":
    # Simple sanity test
    heap = []
    data = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]
    for item in data:
        heappush(heap, item)
    sort = []
    while heap:
        sort.append(heappop(heap))
    print sort

    heap = []
    data = [('e5',7), ('a1',9), ('b2',8),('d3',7),('c4',6)]
    for item in data:
        heappush(heap, item)
    sort = []
    while heap:
        sort.append(heappop(heap))
    print sort
